import request from 'src/utils/request'
const base = import.meta.env.DEV ? 'http://localhost:3019/shenwenyi' : ''
const base_1 = import.meta.env.DEV ? 'http://localhost:3019/zhoupan' : ''

//  基础信息-收费任务-列表
export function payTaskList(data) {
    return request({
        // url: base + '/serve/payment/list',
        url: '/serve/payment/list',
        method: 'post',
        data
    })
}

//  基础信息-收费任务-添加
export function payTaskAdd(data) {
    return request({
        url: '/serve/payment/add',
        method: 'post',
        data
    })
}

//  基础信息-收费任务-通过id查住户
export function getresidentsByRoomId(data) {
    return request({
        url: '/resource/resident/query/' + data,
        // url: base_1 + '/resource/resident/query/' + data,
        method: 'get',
        params: {}
    })
}


//  基础信息-收费任务-批量添加
export function payTaskBatchAdd(data) {
    return request({
        url: '/serve/payment/batchAdd',
        // url: base + '/serve/payment/batchAdd',
        method: 'post',
        data
    })
}

// 导入
export function batchImport(data) {
    return request({
        url: '/serve/payment/import',
        // url: base + '/serve/payment/import',
        method: 'post',
        headers: {'Content-Type': 'multipart/form-data'},
        data
    })
}

// 导出
export function exportApi(data) {
    return request({
        url: '/serve/payment/export',
        method: 'post',
        data
    })
}
// 获取住户
export function householdList(data) {
    return request({
        url: '/resource/resident/query/list',
        method: 'post',
        data
    })
}

// 获取 项目、分期、楼栋、单元 下所有房间id
export function getRoomId(data) {
    return request({
        // url: base + '/resource/room/query/chooseRoom',
        url: '/resource/room/query/chooseRoom',
        method: 'post',
        data
    })
}